﻿@model NOSDC.Areas.Admin.Models.ArticleViewModel

@{
    ViewBag.Title = "Edit";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="../../../../Scripts/ckeditor/ckeditor.js" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
<fieldset>
        <legend>Update an article</legend>
 
        <div style="padding-bottom:20px;">
            <div style="float:left; padding-right:20px;">
            <div class="editor-label">
                <strong> @Html.LabelFor(model => model.Article.Title)</strong>
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.Article.Title, new { style = "width:400px;" })
                @Html.ValidationMessageFor(model => model.Article.Title)
            </div>
            </div>
            <div style="float:left;">
            <div class="editor-label">
                <strong> Status</strong>
            </div>
            <div class="editor-field">
                 @Html.DropDownListFor(model => model.Article.StatusID, Model.StatusValues, new { style = "width:200px;" })
            </div>
            </div>
        </div>
        
        <div class="editor-label" style="clear:both;">
            <strong> @Html.LabelFor(model => model.Article.Story)</strong>
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Article.Story, new {@class = "ckeditor", style = "width:620px;height:150px;" })
            @Html.ValidationMessageFor(model => model.Article.Story)
        </div>

        <div>
            <div class="editor-label" style="float:left;padding-right:20px;">
                <strong>Date Posted:</strong> @Html.DisplayFor(model => model.Article.DatePosted)
            </div>

            <div class="editor-label" style="float:left;padding-right:20px;">
                <strong>Posted By:</strong> @Membership.GetUser().UserName
            </div>
             <div>
                 <div class="editor-label"  style="float:left;">
                    <strong>Article ID:</strong> @Html.DisplayFor(model => model.Article.ArticleID)
                </div>
            </div>
        </div>

     
        <br /><br />
        <p>
            <input type="submit" value="Update Article" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

